/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package entity;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class ContattoCriteria extends AbstractORMCriteria {
	public final IntegerExpression ID;
	public final StringExpression nickname;
	public final StringExpression nome;
	public final StringExpression cognome;
	public final StringExpression avatar;
	public final StringExpression indirizzo_mail;
	
	public ContattoCriteria(Criteria criteria) {
		super(criteria);
		ID = new IntegerExpression("ID", this);
		nickname = new StringExpression("nickname", this);
		nome = new StringExpression("nome", this);
		cognome = new StringExpression("cognome", this);
		avatar = new StringExpression("avatar", this);
		indirizzo_mail = new StringExpression("indirizzo_mail", this);
	}
	
	public ContattoCriteria(PersistentSession session) {
		this(session.createCriteria(Contatto.class));
	}
	
	public ContattoCriteria() throws PersistentException {
		this(entity.CaranonnaPersistentManager.instance().getSession());
	}
	
	public UtenteCriteria createUtenteCriteria() {
		return new UtenteCriteria(createCriteria("utente"));
	}
	
	public Contatto uniqueContatto() {
		return (Contatto) super.uniqueResult();
	}
	
	public Contatto[] listContatto() {
		java.util.List list = super.list();
		return (Contatto[]) list.toArray(new Contatto[list.size()]);
	}
}

